﻿<?php
if(!defined('IN_PHPSCUP'))exit('hacking'); 

class IntegralsettingApp extends BaseApp
{
    function index()
    {
		
		
		$TB_links = &$this->_model('integralsetting');  
		
		$linksdata = $TB_links->show();
				
        $this->assign('linksdata',$linksdata);		
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');
		
        $this->display('integralsetting_list.view.php');
    }

    function edit()
    {
		
	    $id = $_GET['id'];	
		

		
		$TB_links = &$this->_model('integralsetting');  
		
		$picdata = $TB_links->oneshow($id);
        $this->assign('data',$picdata);		
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');
		
        $this->display('integralsetting_edit.view.php');
    }

    function add()
    {
		
	
	    
        $this->assign('view_charset', VIEW_CHARSET);	
        $this->assign('page_title', $GLOBALS['Lang']->_get_lang_var(SITE_TITLE));
        $this->assign('page_description', $GLOBALS['Lang']->_get_lang_var(SITE_DESCRIPTION));
        $this->assign('page_keywords', $GLOBALS['Lang']->_get_lang_var(SITE_KEYWORDS));	
		
        $this->assign('site_url',SITE_URL);
		
        $this->assign('web_view_dir',SITE_URL.'/admin/view/default/');
		
        $this->display('integralsetting_add.view.php');
    }


    function addpost()
    {

	     $data = $_POST['data'];
 	 
		 $TB_links = &$this->_model('integralsetting');  
	 
		
		 $TB_links->post($data);
		 
		 $this->index();

    }

    function editpost()
    {

	     $data = $_POST['data'];

		 
		 $id = intval($data['id']);	 
		 $TB_links = &$this->_model('integralsetting');  
		 $TB_links->editaction($id,$data);
		 
		 
		 $this->index();

    }


    function del()
    {

	     $id = $_GET['id'];
		 $TB_links = &$this->_model('integralsetting');  
		 		
		 $TB_links->del($id);	
		 	 	 
		 $this->index();	  

    }



	
}


?>